#include <iostream>
using namespace std;

int main() {
    int apple[11];
    for (int i = 0; i < 10; i++)
    {
        cin >> apple[i];
    }
    int hight;
    cin >> hight;

    int get = 0;
    for (int i = 0; i < 10; i++)
    {
        if (apple[i] <= hight + 30)
        {
            get++;
        }
        
    }
    cout << get;
    
    
    return 0;
}